package com.study.sequence.common;

import lombok.extern.slf4j.Slf4j;

/**
 * Created by 张波 on 2020/5/23.
 */
@Slf4j
public class SequenceFlushRunable implements Runnable {

    private SequenceDTO sequenceDTO;


    public SequenceFlushRunable(SequenceDTO sequenceDTO) {
        this.sequenceDTO = sequenceDTO;
    }

    /**
     * 多线程任务进行刷新操作
     */
    @Override
    public void run() {
        log.info("并行刷新缓存池任务执行中");
        sequenceDTO.getFlushService().flush(sequenceDTO);
        log.info("并行刷新缓存完成");
    }


}
